<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>AI资讯 - AI知识管理中心</title>
    <script src="https://cdn.tailwindcss.com"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/animejs/3.2.1/anime.min.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/echarts@5.4.3/dist/echarts.min.js"></script>
    <link href="https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@300;400;500;700&family=Noto+Serif+SC:wght@400;500;700&display=swap" rel="stylesheet">
    <style>
        body {
            font-family: 'Noto Sans SC', sans-serif;
            background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
            min-height: 100vh;
        }
        .glass-card {
            background: rgba(255, 255, 255, 0.95);
            backdrop-filter: blur(10px);
            border: 1px solid rgba(255, 255, 255, 0.2);
        }
        .news-card {
            transition: all 0.3s ease;
            cursor: pointer;
        }
        .news-card:hover {
            transform: translateY(-4px);
            box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
        }
        .category-tab {
            transition: all 0.3s ease;
        }
        .category-tab.active {
            background: linear-gradient(135deg, #3b82f6, #1e40af);
            color: white;
        }
        .modal {
            backdrop-filter: blur(8px);
        }
        .fade-in {
            animation: fadeIn 0.5s ease-in-out;
        }
        @keyframes fadeIn {
            from { opacity: 0; transform: translateY(20px); }
            to { opacity: 1; transform: translateY(0); }
        }
        .pulse-dot {
            animation: pulse 2s infinite;
        }
        @keyframes pulse {
            0%, 100% { opacity: 1; }
            50% { opacity: 0.5; }
        }
        .trending-up {
            color: #10b981;
        }
        .trending-down {
            color: #ef4444;
        }
        .tag-cloud {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
        }
        .tag-item {
            transition: all 0.2s ease;
            cursor: pointer;
        }
        .tag-item:hover {
            transform: scale(1.05);
        }
        .source-badge {
            display: inline-flex;
            align-items: center;
            gap: 4px;
            padding: 4px 8px;
            border-radius: 12px;
            font-size: 12px;
            font-weight: 500;
        }
    </style>
</head>
<body>
    <!-- 导航栏 -->
    <nav class="fixed top-0 left-0 right-0 z-50 glass-card">
        <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
            <div class="flex justify-between items-center h-16">
                <div class="flex items-center space-x-3">
                    <div class="w-8 h-8 bg-gradient-to-r from-blue-500 to-blue-600 rounded-lg flex items-center justify-center">
                        <span class="text-white font-bold text-sm">AI</span>
                    </div>
                    <h1 class="text-xl font-bold text-gray-800">知识管理中心</h1>
                </div>
                <div class="flex space-x-6">
                    <a href="index.html" class="text-gray-600 hover:text-blue-600 transition-colors">仪表板</a>
                    <a href="notes.html" class="text-gray-600 hover:text-blue-600 transition-colors">学习笔记</a>
                    <a href="news.html" class="text-blue-600 font-medium border-b-2 border-blue-600 pb-1">AI资讯</a>
                    <a href="settings.html" class="text-gray-600 hover:text-blue-600 transition-colors">设置</a>
                </div>
            </div>
        </div>
    </nav>

    <div class="pt-16 min-h-screen">
        <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8">
            <!-- 页面标题 -->
            <div class="mb-8">
                <h1 class="text-3xl font-bold text-gray-800 mb-2">AI资讯中心</h1>
                <p class="text-gray-600">追踪最新的AI大模型和编程工具动态</p>
            </div>

            <!-- 统计概览 -->
            <div class="grid grid-cols-1 md:grid-cols-4 gap-6 mb-8">
                <div class="glass-card rounded-2xl p-6 text-center">
                    <div class="text-2xl font-bold text-blue-600 mb-2" id="total-news">0</div>
                    <div class="text-gray-700">今日资讯</div>
                    <div class="text-sm text-green-600 mt-1">
                        <span class="trending-up">↗ +12%</span> 较昨日
                    </div>
                </div>
                <div class="glass-card rounded-2xl p-6 text-center">
                    <div class="text-2xl font-bold text-green-600 mb-2" id="model-updates">0</div>
                    <div class="text-gray-700">模型更新</div>
                    <div class="text-sm text-green-600 mt-1">
                        <span class="trending-up">↗ +8%</span> 较昨日
                    </div>
                </div>
                <div class="glass-card rounded-2xl p-6 text-center">
                    <div class="text-2xl font-bold text-purple-600 mb-2" id="tool-releases">0</div>
                    <div class="text-gray-700">工具发布</div>
                    <div class="text-sm text-red-600 mt-1">
                        <span class="trending-down">↘ -3%</span> 较昨日
                    </div>
                </div>
                <div class="glass-card rounded-2xl p-6 text-center">
                    <div class="text-2xl font-bold text-orange-600 mb-2" id="research-papers">0</div>
                    <div class="text-gray-700">研究论文</div>
                    <div class="text-sm text-green-600 mt-1">
                        <span class="trending-up">↗ +15%</span> 较昨日
                    </div>
                </div>
            </div>

            <div class="grid grid-cols-1 lg:grid-cols-4 gap-8">
                <!-- 侧边栏 -->
                <div class="lg:col-span-1">
                    <div class="space-y-6">
                        <!-- 分类筛选 -->
                        <div class="glass-card rounded-2xl p-6 shadow-lg">
                            <h3 class="text-lg font-semibold text-gray-800 mb-4">资讯分类</h3>
                            <div class="space-y-2" id="category-tabs">
                                <button class="category-tab w-full text-left px-4 py-3 rounded-lg active" data-category="all">
                                    全部资讯 <span class="float-right" id="count-all">0</span>
                                </button>
                                <button class="category-tab w-full text-left px-4 py-3 rounded-lg hover:bg-gray-100" data-category="models">
                                    大模型动态 <span class="float-right" id="count-models">0</span>
                                </button>
                                <button class="category-tab w-full text-left px-4 py-3 rounded-lg hover:bg-gray-100" data-category="tools">
                                    编程工具 <span class="float-right" id="count-tools">0</span>
                                </button>
                                <button class="category-tab w-full text-left px-4 py-3 rounded-lg hover:bg-gray-100" data-category="research">
                                    研究论文 <span class="float-right" id="count-research">0</span>
                                </button>
                                <button class="category-tab w-full text-left px-4 py-3 rounded-lg hover:bg-gray-100" data-category="industry">
                                    行业动态 <span class="float-right" id="count-industry">0</span>
                                </button>
                            </div>
                        </div>

                        <!-- 热门标签 -->
                        <div class="glass-card rounded-2xl p-6 shadow-lg">
                            <h3 class="text-lg font-semibold text-gray-800 mb-4">热门标签</h3>
                            <div class="tag-cloud" id="hot-tags">
                                <!-- 标签将通过JavaScript动态添加 -->
                            </div>
                        </div>

                        <!-- 时间筛选 -->
                        <div class="glass-card rounded-2xl p-6 shadow-lg">
                            <h3 class="text-lg font-semibold text-gray-800 mb-4">时间范围</h3>
                            <select id="time-filter" class="w-full px-3 py-2 border border-gray-300 rounded-lg">
                                <option value="today">今天</option>
                                <option value="week">本周</option>
                                <option value="month">本月</option>
                                <option value="all">全部</option>
                            </select>
                        </div>

                        <!-- 资讯趋势图 -->
                        <div class="glass-card rounded-2xl p-6 shadow-lg">
                            <h3 class="text-lg font-semibold text-gray-800 mb-4">资讯趋势</h3>
                            <div id="trend-chart" style="height: 200px;"></div>
                        </div>
                    </div>
                </div>

                <!-- 资讯列表 -->
                <div class="lg:col-span-3">
                    <!-- 搜索和筛选 -->
                    <div class="glass-card rounded-2xl p-6 shadow-lg mb-6">
                        <div class="flex flex-col sm:flex-row gap-4">
                            <div class="flex-1">
                                <input type="text" id="search-input" placeholder="搜索资讯..." 
                                       class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent">
                            </div>
                            <div class="flex space-x-2">
                                <select id="sort-select" class="px-3 py-2 border border-gray-300 rounded-lg">
                                    <option value="newest">最新发布</option>
                                    <option value="popular">最受欢迎</option>
                                    <option value="relevant">最相关</option>
                                </select>
                                <button id="refresh-btn" class="bg-blue-600 hover:bg-blue-700 text-white px-4 py-2 rounded-lg transition-colors">
                                    刷新
                                </button>
                            </div>
                        </div>
                    </div>

                    <!-- 资讯卡片网格 -->
                    <div id="news-grid" class="grid grid-cols-1 md:grid-cols-2 gap-6">
                        <!-- 资讯卡片将通过JavaScript动态添加 -->
                    </div>

                    <!-- 加载更多 -->
                    <div class="text-center mt-8">
                        <button id="load-more-btn" class="bg-gray-200 hover:bg-gray-300 text-gray-700 px-6 py-3 rounded-lg transition-colors">
                            加载更多
                        </button>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <!-- 资讯详情模态框 -->
    <div id="news-modal" class="fixed inset-0 bg-black bg-opacity-50 modal hidden z-50 flex items-center justify-center p-4">
        <div class="glass-card rounded-2xl max-w-4xl w-full max-h-[90vh] overflow-y-auto">
            <div class="p-6">
                <!-- 模态框头部 -->
                <div class="flex items-center justify-between mb-6">
                    <div class="flex items-center space-x-3">
                        <span id="modal-category" class="px-3 py-1 bg-blue-100 text-blue-800 rounded-full text-sm font-medium"></span>
                        <span id="modal-date" class="text-gray-500 text-sm"></span>
                    </div>
                    <button onclick="closeModal()" class="text-gray-400 hover:text-gray-600 transition-colors">
                        <svg class="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24">
                            <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"></path>
                        </svg>
                    </button>
                </div>

                <!-- 资讯标题 -->
                <h2 id="modal-title" class="text-2xl font-bold text-gray-800 mb-4"></h2>

                <!-- 资讯来源 -->
                <div class="flex items-center space-x-4 mb-6">
                    <div id="modal-source" class="source-badge bg-gray-100 text-gray-700"></div>
                    <div class="flex items-center space-x-2">
                        <span class="text-sm text-gray-500">阅读时间</span>
                        <span id="modal-read-time" class="text-sm font-medium text-gray-700"></span>
                    </div>
                </div>

                <!-- 资讯内容 -->
                <div id="modal-content" class="prose max-w-none mb-6">
                    <!-- 内容将通过JavaScript动态添加 -->
                </div>

                <!-- 标签 -->
                <div id="modal-tags" class="flex flex-wrap gap-2 mb-6">
                    <!-- 标签将通过JavaScript动态添加 -->
                </div>

                <!-- 操作按钮 -->
                <div class="flex items-center justify-between border-t pt-6">
                    <div class="flex space-x-3">
                        <button onclick="saveToNotes()" class="bg-blue-600 hover:bg-blue-700 text-white px-4 py-2 rounded-lg transition-colors">
                            收藏到笔记
                        </button>
                        <button onclick="shareNews()" class="bg-green-600 hover:bg-green-700 text-white px-4 py-2 rounded-lg transition-colors">
                            分享资讯
                        </button>
                    </div>
                    <div class="flex items-center space-x-4 text-sm text-gray-500">
                        <span id="modal-views">0 次阅读</span>
                        <span id="modal-shares">0 次分享</span>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <script>
        // 全局变量
        let newsData = [];
        let filteredNews = [];
        let currentCategory = 'all';
        let currentNews = null;
        let displayedCount = 0;
        const itemsPerPage = 6;

        // 初始化
        document.addEventListener('DOMContentLoaded', function() {
            initializeNews();
            loadNews();
            updateStatistics();
            generateHotTags();
            initializeTrendChart();
            bindEventListeners();
        });

        // 初始化资讯数据
        function initializeNews() {
            newsData = [
                {
                    id: 1,
                    title: 'DeepSeek V3.3重磅更新：编程能力大幅提升，性能媲美Claude 3.7',
                    summary: '深度求索发布DeepSeek V3.3版本，在前端代码生成能力上实现质的飞跃，新版本采用MIT许可证，支持商业项目自由集成。',
                    content: `
                        <h3>核心改进</h3>
                        <p>DeepSeek V3.3版本带来了多项重要更新，特别是在编程能力方面的提升令人瞩目。新版本在多个基准测试中表现出色，特别是在代码生成和逻辑推理任务上。</p>
                        
                        <h3>技术规格</h3>
                        <ul>
                            <li><strong>参数规模</strong>：6850亿参数，MoE架构</li>
                            <li><strong>激活参数</strong>：约370亿</li>
                            <li><strong>许可证</strong>：MIT许可证，支持商业使用</li>
                            <li><strong>上下文长度</strong>：128K tokens</li>
                            <li><strong>生成速度</strong>：60 tokens/秒</li>
                        </ul>

                        <h3>性能表现</h3>
                        <p>在多个基准测试中，DeepSeek V3.3展现出优异的性能：</p>
                        <ul>
                            <li>MMLU-Pro: 81.2分（超过GPT-4o的72.6分）</li>
                            <li>GPQA: 68.4分（提升9.3分）</li>
                            <li>AIME 2024: 59.4分（提升19.8分）</li>
                            <li>LiveCodeBench: 49.2分（提升10.0分）</li>
                        </ul>

                        <h3>实际应用</h3>
                        <p>开发者反馈显示，DeepSeek V3.3在以下方面表现突出：</p>
                        <ul>
                            <li>前端代码生成质量接近Claude 3.7水平</li>
                            <li>支持多种编程语言（Python、C++、Java、Rust等）</li>
                            <li>数学与逻辑推理任务表现优异</li>
                            <li>中文处理能力显著提升</li>
                        </ul>

                        <h3>开源意义</h3>
                        <p>DeepSeek V3.3的开源发布具有重要意义，为开发者提供了高性价比的AI模型选择，推动了AI技术的普及和应用。</p>
                    `,
                    category: 'models',
                    source: '深度求索',
                    publishedAt: '2025-03-24',
                    tags: ['DeepSeek', '编程', '开源', 'V3.3', '前端开发'],
                    image: './resources/image_01.jpg',
                    readTime: '8分钟',
                    views: 1250,
                    shares: 45
                },
                {
                    id: 2,
                    title: 'Claude Code 2.0发布：AI编程助手进入新纪元',
                    summary: 'Anthropic推出Claude Code 2.0重大更新，新增Hooks功能和VS Code插件，让AI从辅助工具进化为真正的开发伙伴。',
                    content: `
                        <h3>革命性更新</h3>
                        <p>Claude Code 2.0的发布标志着AI编程助手的重要里程碑。这次更新不仅仅是功能的增加，更是AI角色定位的转变——从单纯的代码助手进化为可靠的"编程伙伴"。</p>

                        <h3>Hooks功能详解</h3>
                        <p>Hooks是Claude Code 2.0的核心创新，它允许开发者在AI代理循环的不同阶段执行自定义命令：</p>
                        <ul>
                            <li><strong>PreToolUse</strong>：工具调用前执行，如安全验证</li>
                            <li><strong>PostToolUse</strong>：工具调用后执行，如自动测试</li>
                            <li><strong>Notification</strong>：发送通知和提醒</li>
                        </ul>

                        <h3>Sonnet 4.5模型</h3>
                        <p>配合Claude Code 2.0，Anthropic同时发布了Sonnet 4.5模型：</p>
                        <ul>
                            <li>在OSWorld基准测试中得分61.4%</li>
                            <li>较前代Sonnet 4提升近20个百分点</li>
                            <li>支持连续30小时编码任务</li>
                            <li>工具协调能力显著增强</li>
                        </ul>

                        <h3>实际应用场景</h3>
                        <p>Hooks功能为开发者带来了极大的灵活性：</p>
                        <ul>
                            <li>文件修改后自动运行代码格式化</li>
                            <li>自动记录所有命令便于调试</li>
                            <li>阻止对生产环境文件的误操作</li>
                            <li>代码不符合规范时自动提供反馈</li>
                        </ul>

                        <h3>生态系统扩展</h3>
                        <p>Claude Code 2.0还带来了生态系统的扩展：</p>
                        <ul>
                            <li>VS Code插件正式推出</li>
                            <li>GitHub Copilot集成Sonnet 4.5</li>
                            <li>Claude for Chrome浏览器扩展</li>
                            <li>企业级API和SDK更新</li>
                        </ul>

                        <h3>安全与合规</h3>
                        <p>所有升级都在AI Safety Level 3框架下开发，确保企业级应用的安全性和合规性。</p>
                    `,
                    category: 'tools',
                    source: 'Anthropic',
                    publishedAt: '2025-03-20',
                    tags: ['Claude', '编程助手', 'Hooks', 'VS Code', '自动化'],
                    image: './resources/image_03.jpg',
                    readTime: '6分钟',
                    views: 980,
                    shares: 32
                },
                {
                    id: 3,
                    title: 'GPT-4.5预览版发布：性能再创新高但定价引发争议',
                    summary: 'OpenAI发布GPT-4.5预览版，在多个基准测试中超越前代模型，但高达$200/月的定价引发开发者社区广泛讨论。',
                    content: `
                        <h3>性能突破</h3>
                        <p>GPT-4.5预览版在多个方面实现了性能突破，特别是在推理能力和多模态处理方面。根据OpenAI的官方测试，新版本在以下方面表现优异：</p>
                        
                        <ul>
                            <li>语言理解能力显著提升</li>
                            <li>代码生成质量大幅改善</li>
                            <li>多模态处理能力增强</li>
                            <li>长文本处理能力优化</li>
                        </ul>

                        <h3>定价策略分析</h3>
                        <p>GPT-4.5的定价策略引起了广泛讨论：</p>
                        <ul>
                            <li><strong>Pro用户</strong>：$200/月，仅限体验</li>
                            <li><strong>输入成本</strong>：$75/百万tokens</li>
                            <li><strong>输出成本</strong>：$150/百万tokens</li>
                        </ul>

                        <h3>社区反响</h3>
                        <p>开发者社区对GPT-4.5的定价策略反应不一：</p>
                        <ul>
                            <li>部分用户认为性能提升值得这个价格</li>
                            <li>许多开发者认为定价过高，难以承受</li>
                            <li>有用户表示DeepSeek-R1在某些场景下表现更好</li>
                            <li>开源社区对闭源模型的高定价表示担忧</li>
                        </ul>

                        <h3>技术对比</h3>
                        <p>与其他主流模型的对比：</p>
                        <ul>
                            <li>vs DeepSeek V3.3：性价比争议</li>
                            <li>vs Claude 3.7：编程能力对比</li>
                            <li>vs Gemini 2.5 Pro：多模态能力比较</li>
                        </ul>

                        <h3>未来展望</h3>
                        <p>尽管存在定价争议，GPT-4.5的发布仍然代表了AI技术的重要进步，为高端应用场景提供了新的选择。</p>
                    `,
                    category: 'models',
                    source: 'OpenAI',
                    publishedAt: '2025-03-15',
                    tags: ['GPT-4.5', 'OpenAI', '定价', '预览版', '性能'],
                    image: './resources/image_06.jpg',
                    readTime: '5分钟',
                    views: 1540,
                    shares: 67
                },
                {
                    id: 4,
                    title: 'Google Gemini 2.5 Pro：长上下文处理能力突破200万tokens',
                    summary: 'Google发布Gemini 2.5 Pro，支持200万tokens超长上下文，在复杂文档分析和多轮对话方面表现卓越。',
                    content: `
                        <h3>技术突破</h3>
                        <p>Google Gemini 2.5 Pro的发布代表了长上下文处理技术的重大突破。新版本支持高达200万tokens的上下文长度，这相当于可以处理约150万字的文本内容。</p>

                        <h3>核心特性</h3>
                        <ul>
                            <li><strong>超长上下文</strong>：200万tokens（稳定支持200万，实验性支持1000万）</li>
                            <li><strong>多模态集成</strong>：支持文本、图像、音频、视频</li>
                            <li><strong>实时推理</strong>：支持实时多轮对话</li>
                            <li><strong>文档分析</strong>：擅长处理复杂文档和长篇文章</li>
                        </ul>

                        <h3>应用场景</h3>
                        <p>Gemini 2.5 Pro的超长上下文能力为以下应用场景带来革命性变化：</p>
                        <ul>
                            <li>整本书籍的分析和总结</li>
                            <li>复杂法律文档的理解</li>
                            <li>大规模代码库的分析</li>
                            <li>多轮技术对话和咨询</li>
                            <li>学术论文的深度分析</li>
                        </ul>

                        <h3>性能基准</h3>
                        <p>在多个长文本处理基准测试中，Gemini 2.5 Pro表现出色：</p>
                        <ul>
                            <li>LongBench v2：领先其他模型</li>
                            <li>DROP测试：优异的阅读理解能力</li>
                            <li>FRAMES测试：强大的长视频理解</li>
                        </ul>

                        <h3>开发者体验</h3>
                        <p>开发者可以通过Google AI Studio和Gemini API访问2.5 Pro模型，支持多种集成方式：</p>
                        <ul>
                            <li>REST API调用</li>
                            <li>Python SDK支持</li>
                            <li>Vertex AI集成</li>
                            <li>实时流式处理</li>
                        </ul>

                        <h3>行业影响</h3>
                        <p>Gemini 2.5 Pro的发布将对多个行业产生深远影响，特别是在需要处理大量文本数据的领域。</p>
                    `,
                    category: 'models',
                    source: 'Google',
                    publishedAt: '2025-03-10',
                    tags: ['Gemini', '长上下文', 'Google', '文档分析', '多模态'],
                    image: './resources/image_13.jpg',
                    readTime: '7分钟',
                    views: 1120,
                    shares: 38
                },
                {
                    id: 5,
                    title: 'Trae免费接入Claude 3.7：AI编程工具市场再起波澜',
                    summary: 'Trae平台宣布免费接入Claude 3.7 Sonnet，让开发者免费体验地表最强编程能力，引发AI编程工具市场竞争加剧。',
                    content: `
                        <h3>免费策略冲击市场</h3>
                        <p>Trae平台宣布免费接入Claude 3.7 Sonnet的决定在AI编程工具市场引起了巨大反响。这一举措让普通开发者也能够免费使用目前被认为是地表最强的编程模型。</p>

                        <h3>Claude 3.7 Sonnet优势</h3>
                        <p>根据官方评测结果，Claude 3.7 Sonnet在多个方面表现优异：</p>
                        <ul>
                            <li><strong>SWE-bench Verified</strong>：达到最先进的性能水平</li>
                            <li><strong>实际软件问题解决能力</strong>：在评估中表现突出</li>
                            <li><strong>代码理解和生成</strong>：质量显著提升</li>
                            <li><strong>复杂项目处理</strong>：能够处理大型代码库</li>
                        </ul>

                        <h3>Trae平台特色</h3>
                        <p>Trae平台提供了多项特色功能：</p>
                        <ul>
                            <li>智能问答和代码解释</li>
                            <li>实时代码建议和自动补全</li>
                            <li>基于Agent的AI自动编程</li>
                            <li>项目级代码生成能力</li>
                            <li>跨文件代码理解和修改</li>
                        </ul>

                        <h3>市场影响分析</h3>
                        <p>Trae的免费策略对AI编程工具市场产生了重要影响：</p>
                        <ul>
                            <li>降低了AI编程工具的准入门槛</li>
                            <li>加剧了与GitHub Copilot等付费工具的竞争</li>
                            <li>推动了AI编程工具的普及</li>
                            <li>为个人开发者提供了高质量选择</li>
                        </ul>

                        <h3>使用体验</h3>
                        <p>用户反馈显示，Trae + Claude 3.7的组合在以下方面表现出色：</p>
                        <ul>
                            <li>代码生成准确率高</li>
                            <li>对复杂需求的理解能力强</li>
                            <li>响应速度相对较快</li>
                            <li>中文支持良好</li>
                        </ul>

                        <h3>未来展望</h3>
                        <p>Trae表示正在积极扩大容量以应对大量用户请求，并承诺持续改进服务质量。这一举措可能会推动整个AI编程工具市场向更加开放和普惠的方向发展。</p>
                    `,
                    category: 'tools',
                    source: 'Trae',
                    publishedAt: '2025-03-01',
                    tags: ['Trae', 'Claude 3.7', '免费', '编程工具', '市场竞争'],
                    image: './resources/image_07.webp',
                    readTime: '6分钟',
                    views: 890,
                    shares: 29
                },
                {
                    id: 6,
                    title: 'AI Agent技术突破：自主编程能力达到新高度',
                    summary: '最新研究显示，AI Agent在自主编程和代码修复方面取得重大突破，能够独立完成复杂软件开发任务。',
                    content: `
                        <h3>技术突破概述</h3>
                        <p>最新发布的研究显示，AI Agent在自主编程领域取得了重大突破。研究团队开发的AI Agent能够独立完成复杂的软件开发任务，包括需求分析、架构设计、代码实现和测试验证。</p>

                        <h3>核心能力展示</h3>
                        <p>AI Agent展现了以下核心能力：</p>
                        <ul>
                            <li><strong>需求理解</strong>：准确理解自然语言描述的复杂需求</li>
                            <li><strong>架构设计</strong>：能够设计合理的软件架构</li>
                            <li><strong>代码生成</strong>：生成高质量、可维护的代码</li>
                            <li><strong>自动测试</strong>：编写测试用例并进行验证</li>
                            <li><strong>错误修复</strong>：自动发现和修复代码缺陷</li>
                        </ul>

                        <h3>实验结果</h3>
                        <p>在多个基准测试中，AI Agent表现出色：</p>
                        <ul>
                            <li>HumanEval测试：通过率85%（较之前提升30%）</li>
                            <li>MBPP测试：通过率78%</li>
                            <li>SWE-bench：成功解决65%的真实GitHub问题</li>
                            <li>复杂项目开发：能够完成中等复杂度的完整应用</li>
                        </ul>

                        <h3>技术架构</h3>
                        <p>AI Agent采用了创新的技术架构：</p>
                        <ul>
                            <li>多Agent协作系统</li>
                            <li>分层规划和执行机制</li>
                            <li>动态学习和适应能力</li>
                            <li>工具调用和外部API集成</li>
                        </ul>

                        <h3>实际应用案例</h3>
                        <p>研究团队展示了多个实际应用案例：</p>
                        <ul>
                            <li>完整Web应用开发（前端+后端）</li>
                            <li>移动应用自动生成</li>
                            <li>数据处理管道构建</li>
                            <li>API服务自动部署</li>
                        </ul>

                        <h3>局限性和挑战</h3>
                        <p>尽管取得了重大突破，AI Agent仍面临一些挑战：</p>
                        <ul>
                            <li>对复杂业务逻辑的理解有限</li>
                            <li>代码优化和性能调优能力待提升</li>
                            <li>安全性和可靠性需要进一步验证</li>
                            <li>与人类开发者的协作模式需要完善</li>
                        </ul>

                        <h3>行业影响</h3>
                        <p>这一技术突破将对软件开发行业产生深远影响，可能改变传统的开发模式和工作流程。</p>
                    `,
                    category: 'research',
                    source: 'AI Research Institute',
                    publishedAt: '2025-02-28',
                    tags: ['AI Agent', '自主编程', '代码生成', '软件工程', '技术突破'],
                    image: './resources/image_02.webp',
                    readTime: '9分钟',
                    views: 750,
                    shares: 23
                }
            ];
        }

        // 绑定事件监听器
        function bindEventListeners() {
            // 分类标签点击
            document.querySelectorAll('.category-tab').forEach(tab => {
                tab.addEventListener('click', function() {
                    const category = this.dataset.category;
                    filterByCategory(category);
                    
                    // 更新活跃状态
                    document.querySelectorAll('.category-tab').forEach(t => t.classList.remove('active'));
                    this.classList.add('active');
                });
            });

            // 搜索功能
            document.getElementById('search-input').addEventListener('input', function(e) {
                searchNews(e.target.value);
            });

            // 排序功能
            document.getElementById('sort-select').addEventListener('change', function() {
                sortNews(this.value);
            });

            // 时间筛选
            document.getElementById('time-filter').addEventListener('change', function() {
                filterByTime(this.value);
            });

            // 刷新按钮
            document.getElementById('refresh-btn').addEventListener('click', function() {
                refreshNews();
            });

            // 加载更多
            document.getElementById('load-more-btn').addEventListener('click', function() {
                loadMoreNews();
            });

            // 模态框关闭
            document.getElementById('news-modal').addEventListener('click', function(e) {
                if (e.target === this) {
                    closeModal();
                }
            });
        }

        // 加载资讯
        function loadNews() {
            filteredNews = [...newsData];
            displayedCount = 0;
            renderNews();
            updateCategoryCounts();
        }

        // 渲染资讯
        function renderNews() {
            const newsGrid = document.getElementById('news-grid');
            const newsToShow = filteredNews.slice(0, displayedCount + itemsPerPage);
            
            newsGrid.innerHTML = newsToShow.map(news => `
                <div class="news-card glass-card rounded-2xl p-6 shadow-lg fade-in" onclick="openNewsModal(${news.id})">
                    <div class="aspect-video bg-gray-200 rounded-lg mb-4 overflow-hidden">
                        <img src="${news.image}" alt="${news.title}" class="w-full h-full object-cover">
                    </div>
                    
                    <div class="flex items-center justify-between mb-3">
                        <span class="px-3 py-1 bg-blue-100 text-blue-800 rounded-full text-sm font-medium">
                            ${getCategoryName(news.category)}
                        </span>
                        <div class="flex items-center space-x-2 text-sm text-gray-500">
                            <span>${formatDate(news.publishedAt)}</span>
                            <span class="pulse-dot w-2 h-2 bg-green-500 rounded-full"></span>
                        </div>
                    </div>
                    
                    <h3 class="text-lg font-bold text-gray-800 mb-2 line-clamp-2">${news.title}</h3>
                    <p class="text-gray-600 mb-4 line-clamp-3">${news.summary}</p>
                    
                    <div class="flex items-center justify-between mb-4">
                        <div class="source-badge bg-gray-100 text-gray-700">
                            <svg class="w-4 h-4" fill="currentColor" viewBox="0 0 20 20">
                                <path d="M10 12a2 2 0 100-4 2 2 0 000 4z"/>
                                <path fill-rule="evenodd" d="M.458 10C1.732 5.943 5.522 3 10 3s8.268 2.943 9.542 7c-1.274 4.057-5.064 7-9.542 7S1.732 14.057.458 10zM14 10a4 4 0 11-8 0 4 4 0 018 0z" clip-rule="evenodd"/>
                            </svg>
                            ${news.source}
                        </div>
                        <span class="text-sm text-gray-500">${news.readTime}</span>
                    </div>
                    
                    <div class="flex items-center justify-between">
                        <div class="tag-cloud">
                            ${news.tags.slice(0, 3).map(tag => `
                                <span class="tag-item px-2 py-1 bg-gray-100 text-gray-600 text-xs rounded">${tag}</span>
                            `).join('')}
                            ${news.tags.length > 3 ? `<span class="text-xs text-gray-500">+${news.tags.length - 3}</span>` : ''}
                        </div>
                        <div class="flex items-center space-x-3 text-sm text-gray-500">
                            <span>👁 ${news.views}</span>
                            <span>📤 ${news.shares}</span>
                        </div>
                    </div>
                </div>
            `).join('');

            // 更新加载更多按钮状态
            const loadMoreBtn = document.getElementById('load-more-btn');
            if (displayedCount + itemsPerPage >= filteredNews.length) {
                loadMoreBtn.style.display = 'none';
            } else {
                loadMoreBtn.style.display = 'block';
            }

            displayedCount += itemsPerPage;
        }

        // 按分类筛选
        function filterByCategory(category) {
            currentCategory = category;
            if (category === 'all') {
                filteredNews = [...newsData];
            } else {
                filteredNews = newsData.filter(news => news.category === category);
            }
            displayedCount = 0;
            renderNews();
        }

        // 搜索资讯
        function searchNews(query) {
            if (!query.trim()) {
                filterByCategory(currentCategory);
                return;
            }

            filteredNews = newsData.filter(news => 
                news.title.toLowerCase().includes(query.toLowerCase()) ||
                news.summary.toLowerCase().includes(query.toLowerCase()) ||
                news.tags.some(tag => tag.toLowerCase().includes(query.toLowerCase()))
            );
            displayedCount = 0;
            renderNews();
        }

        // 排序资讯
        function sortNews(sortBy) {
            switch (sortBy) {
                case 'newest':
                    filteredNews.sort((a, b) => new Date(b.publishedAt) - new Date(a.publishedAt));
                    break;
                case 'popular':
                    filteredNews.sort((a, b) => b.views - a.views);
                    break;
                case 'relevant':
                    // 这里可以实现更复杂的排序逻辑
                    break;
            }
            displayedCount = 0;
            renderNews();
        }

        // 按时间筛选
        function filterByTime(timeRange) {
            const now = new Date();
            let startDate;

            switch (timeRange) {
                case 'today':
                    startDate = new Date(now.getFullYear(), now.getMonth(), now.getDate());
                    break;
                case 'week':
                    startDate = new Date(now.getTime() - 7 * 24 * 60 * 60 * 1000);
                    break;
                case 'month':
                    startDate = new Date(now.getFullYear(), now.getMonth(), 1);
                    break;
                case 'all':
                    filterByCategory(currentCategory);
                    return;
            }

            filteredNews = newsData.filter(news => new Date(news.publishedAt) >= startDate);
            displayedCount = 0;
            renderNews();
        }

        // 加载更多资讯
        function loadMoreNews() {
            renderNews();
        }

        // 刷新资讯
        function refreshNews() {
            // 模拟刷新动画
            const refreshBtn = document.getElementById('refresh-btn');
            refreshBtn.innerHTML = '<svg class="w-4 h-4 animate-spin" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"></path></svg>';
            
            setTimeout(() => {
                loadNews();
                refreshBtn.innerHTML = '刷新';
                showNotification('资讯已更新！');
            }, 1000);
        }

        // 打开资讯模态框
        function openNewsModal(newsId) {
            currentNews = newsData.find(news => news.id === newsId);
            if (!currentNews) return;

            // 填充模态框内容
            document.getElementById('modal-category').textContent = getCategoryName(currentNews.category);
            document.getElementById('modal-date').textContent = formatDate(currentNews.publishedAt);
            document.getElementById('modal-title').textContent = currentNews.title;
            document.getElementById('modal-source').innerHTML = `
                <svg class="w-4 h-4" fill="currentColor" viewBox="0 0 20 20">
                    <path d="M10 12a2 2 0 100-4 2 2 0 000 4z"/>
                    <path fill-rule="evenodd" d="M.458 10C1.732 5.943 5.522 3 10 3s8.268 2.943 9.542 7c-1.274 4.057-5.064 7-9.542 7S1.732 14.057.458 10zM14 10a4 4 0 11-8 0 4 4 0 018 0z" clip-rule="evenodd"/>
                </svg>
                ${currentNews.source}
            `;
            document.getElementById('modal-read-time').textContent = currentNews.readTime;
            document.getElementById('modal-content').innerHTML = currentNews.content;
            document.getElementById('modal-views').textContent = `${currentNews.views} 次阅读`;
            document.getElementById('modal-shares').textContent = `${currentNews.shares} 次分享`;

            // 显示标签
            const tagsContainer = document.getElementById('modal-tags');
            tagsContainer.innerHTML = currentNews.tags.map(tag => `
                <span class="px-3 py-1 bg-blue-100 text-blue-800 text-sm rounded-full cursor-pointer hover:bg-blue-200 transition-colors" onclick="searchNews('${tag}'); closeModal();">${tag}</span>
            `).join('');

            // 显示模态框
            document.getElementById('news-modal').classList.remove('hidden');
            
            // 增加阅读次数
            currentNews.views++;
            
            // 添加动画效果
            anime({
                targets: '#news-modal .glass-card',
                scale: [0.8, 1],
                opacity: [0, 1],
                duration: 300,
                easing: 'easeOutQuad'
            });
        }

        // 关闭模态框
        function closeModal() {
            document.getElementById('news-modal').classList.add('hidden');
            currentNews = null;
        }

        // 收藏到笔记
        function saveToNotes() {
            if (!currentNews) return;

            const notes = JSON.parse(localStorage.getItem('notes')) || [];
            const newNote = {
                id: Date.now(),
                title: `资讯收藏：${currentNews.title}`,
                content: `## 资讯来源
- **来源**：${currentNews.source}
- **发布时间**：${formatDate(currentNews.publishedAt)}
- **分类**：${getCategoryName(currentNews.category)}
- **标签**：${currentNews.tags.join(', ')}

## 资讯摘要
${currentNews.summary}

## 详细内容
${currentNews.content.replace(/<[^>]*>/g, '\n')}`,
                category: 'AI资讯',
                tags: [...currentNews.tags, '资讯收藏'],
                createdAt: new Date().toISOString(),
                updatedAt: new Date().toISOString()
            };

            notes.unshift(newNote);
            localStorage.setItem('notes', JSON.stringify(notes));
            
            showNotification('资讯已收藏到笔记！');
            closeModal();
        }

        // 分享资讯
        function shareNews() {
            if (!currentNews) return;

            if (navigator.share) {
                navigator.share({
                    title: currentNews.title,
                    text: currentNews.summary,
                    url: window.location.href
                });
            } else {
                // 复制到剪贴板
                const shareText = `${currentNews.title}\n\n${currentNews.summary}\n\n来自AI知识管理中心`;
                navigator.clipboard.writeText(shareText).then(() => {
                    showNotification('资讯链接已复制到剪贴板！');
                });
            }

            // 增加分享次数
            currentNews.shares++;
        }

        // 更新统计信息
        function updateStatistics() {
            const totalNews = newsData.length;
            const modelUpdates = newsData.filter(n => n.category === 'models').length;
            const toolReleases = newsData.filter(n => n.category === 'tools').length;
            const researchPapers = newsData.filter(n => n.category === 'research').length;

            document.getElementById('total-news').textContent = totalNews;
            document.getElementById('model-updates').textContent = modelUpdates;
            document.getElementById('tool-releases').textContent = toolReleases;
            document.getElementById('research-papers').textContent = researchPapers;

            // 添加数字动画
            animateNumbers();
        }

        // 生成热门标签
        function generateHotTags() {
            const allTags = {};
            newsData.forEach(news => {
                news.tags.forEach(tag => {
                    allTags[tag] = (allTags[tag] || 0) + 1;
                });
            });

            const hotTags = Object.entries(allTags)
                .sort(([,a], [,b]) => b - a)
                .slice(0, 15);

            const hotTagsContainer = document.getElementById('hot-tags');
            hotTagsContainer.innerHTML = hotTags.map(([tag, count]) => `
                <span class="tag-item px-3 py-1 bg-blue-100 text-blue-800 text-sm rounded-full cursor-pointer hover:bg-blue-200 transition-colors" onclick="searchNews('${tag}')">
                    ${tag} (${count})
                </span>
            `).join('');
        }

        // 初始化趋势图
        function initializeTrendChart() {
            const chart = echarts.init(document.getElementById('trend-chart'));
            const option = {
                tooltip: {
                    trigger: 'axis'
                },
                xAxis: {
                    type: 'category',
                    data: ['周一', '周二', '周三', '周四', '周五', '周六', '周日'],
                    axisLabel: {
                        fontSize: 10
                    }
                },
                yAxis: {
                    type: 'value',
                    axisLabel: {
                        fontSize: 10
                    }
                },
                series: [{
                    data: [12, 18, 15, 22, 28, 35, 30],
                    type: 'line',
                    smooth: true,
                    lineStyle: {
                        color: '#3b82f6'
                    },
                    itemStyle: {
                        color: '#3b82f6'
                    },
                    areaStyle: {
                        color: {
                            type: 'linear',
                            x: 0,
                            y: 0,
                            x2: 0,
                            y2: 1,
                            colorStops: [{
                                offset: 0, color: 'rgba(59, 130, 246, 0.3)'
                            }, {
                                offset: 1, color: 'rgba(59, 130, 246, 0.1)'
                            }]
                        }
                    }
                }],
                grid: {
                    left: '10%',
                    right: '10%',
                    top: '10%',
                    bottom: '20%'
                }
            };
            chart.setOption(option);

            // 响应式
            window.addEventListener('resize', function() {
                chart.resize();
            });
        }

        // 更新分类计数
        function updateCategoryCounts() {
            const counts = {
                all: newsData.length,
                models: newsData.filter(n => n.category === 'models').length,
                tools: newsData.filter(n => n.category === 'tools').length,
                research: newsData.filter(n => n.category === 'research').length,
                industry: newsData.filter(n => n.category === 'industry').length
            };

            Object.keys(counts).forEach(key => {
                const element = document.getElementById(`count-${key}`);
                if (element) element.textContent = counts[key];
            });
        }

        // 获取分类名称
        function getCategoryName(category) {
            const categoryNames = {
                'models': '大模型动态',
                'tools': '编程工具',
                'research': '研究论文',
                'industry': '行业动态'
            };
            return categoryNames[category] || '其他';
        }

        // 格式化日期
        function formatDate(dateString) {
            const date = new Date(dateString);
            const now = new Date();
            const diffTime = Math.abs(now - date);
            const diffDays = Math.ceil(diffTime / (1000 * 60 * 60 * 24));
            
            if (diffDays === 1) return '今天';
            if (diffDays === 2) return '昨天';
            if (diffDays <= 7) return `${diffDays}天前`;
            
            return date.toLocaleDateString('zh-CN');
        }

        // 数字动画
        function animateNumbers() {
            const numbers = [
                { element: document.getElementById('total-news'), target: newsData.length },
                { element: document.getElementById('model-updates'), target: newsData.filter(n => n.category === 'models').length },
                { element: document.getElementById('tool-releases'), target: newsData.filter(n => n.category === 'tools').length },
                { element: document.getElementById('research-papers'), target: newsData.filter(n => n.category === 'research').length }
            ];
            
            numbers.forEach(({ element, target }) => {
                if (element) {
                    anime({
                        targets: { value: 0 },
                        value: target,
                        duration: 1500,
                        easing: 'easeOutQuart',
                        update: function(anim) {
                            element.textContent = Math.round(anim.animatables[0].target.value);
                        }
                    });
                }
            });
        }

        // 显示通知
        function showNotification(message) {
            const notification = document.createElement('div');
            notification.className = 'fixed top-20 right-4 bg-green-500 text-white px-6 py-3 rounded-lg shadow-lg z-50 transform translate-x-full transition-transform';
            notification.textContent = message;
            
            document.body.appendChild(notification);
            
            setTimeout(() => {
                notification.style.transform = 'translateX(0)';
            }, 100);
            
            setTimeout(() => {
                notification.style.transform = 'translateX(100%)';
                setTimeout(() => {
                    document.body.removeChild(notification);
                }, 300);
            }, 3000);
        }

        // 键盘快捷键
        document.addEventListener('keydown', function(e) {
            if (e.key === 'Escape') {
                closeModal();
            }
        });
    </script>
    <script src="api.js"></script>
</body>
</html>